load("@rules_cc//cc:defs.bzl", "cc_binary")
load("//bzl:cpp_unittest.bzl", "cpp_unittest")

cc_binary(
    name = "crash",
    srcs = ["Crash.cpp"],
    deps = [
        "//folly/experimental/symbolizer:signal_handler",
    ],
)

cc_binary(
    name = "small_sigaltstack_crash",
    srcs = ["SmallSigAltStackCrash.cpp"],
    deps = [
        "//folly/experimental/symbolizer:signal_handler",
    ],
)

cpp_unittest(
    name = "symbolized_frame_test",
    srcs = ["SymbolizedFrameTest.cpp"],
    deps = [
        "//folly/experimental/symbolizer:symbolized_frame",
        "//folly/portability:gtest",
        "@glog",
    ],
)

# TODO(kgk): Fix test.
# cpp_unittest(
#     name = "elf_test",
#     srcs = ["ElfTest.cpp"],
#     deps = [
#         "//folly:file_util",
#         "//folly/experimental/symbolizer:elf",
#         "//folly/experimental/symbolizer/detail:debug",
#         "//folly/portability:gtest",
#         "//folly/testing:test_util",
#     ],
# )

cpp_unittest(
    name = "line_reader_test",
    srcs = ["LineReaderTest.cpp"],
    deps = [
        "//folly:file_util",
        "//folly/experimental/symbolizer:line_reader",
        "//folly/portability:gtest",
        "//folly/testing:test_util",
        "@glog",
    ],
)
